/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package actions;

import daos.Dao;
import daos.DaoFactory;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author C
 */
public class MostrarLoginAlternativoAction extends Action{
    

    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) {
        try {            
            Dao dao = DaoFactory.getDao("ObraSocial");            
            ArrayList listaOS = (ArrayList) dao.select(null); 
            request.setAttribute("lista_os", listaOS);        
            } catch (Exception ex) {            
                request.setAttribute("Error", ex.getMessage());
            }
        finally{
            this.gotoPage("/loginAlt.jsp", request, response);
        }
        
    }   
}
